package server.content.dungeons;

import server.event.Event;
import server.event.EventContainer;
import server.event.EventManager;
import server.game.players.Client;

/**
 * 
 * @author Miracle
 * 
 */
public class BrimDungeon extends Dungeon {

	public BrimDungeon(Client c) {
		super(c);
	}

	@Override
	public void initObjects() {
		/*
		 * Object: 5084
		 */
		addDungeonObject(new DungeonObject(c, 5084, 2714, -1) {

			@Override
			public void handleObject() {
				c.startAnimation(827);
				c.getPA().requestUpdates();
				EventManager.getSingleton().addEvent(new Event() {

					@Override
					public void execute(EventContainer container) {
						c.getPA().movePlayer(2744, 3152, 0);
						container.stop();
					}
				}, 3);
			}
		});
		/*
		 * Object: 5105
		 */
		addDungeonObject(new DungeonObject(c, 5105, 2673, -1) {

			@Override
			public void handleObject() {
				if (c.getX() == 2674)
					c.getPA().walkTo(-2, 0);
				else if (c.getX() == 2672)
					c.getPA().walkTo(2, 0);
			}
		});
		/*
		 * Object: 5106
		 */
		addDungeonObject(new DungeonObject(c, 5106, -1, 9479) {

			@Override
			public void handleObject() {
				if (c.getX() == 2676)
					c.getPA().walkTo(-2, 0);
				else if (c.getX() == 2674)
					c.getPA().walkTo(2, 0);
			}
		});
		/*
		 * Object: 5107
		 */
		addDungeonObject(new DungeonObject(c, 5107, -1, 9482) {

			@Override
			public void handleObject() {
				if (c.getX() == 2693)
					c.getPA().walkTo(2, 0);
				else if (c.getX() == 2695)
					c.getPA().walkTo(-2, 0);
			}
		});
		/*
		 * Object: 5083
		 */
		addDungeonObject(new DungeonObject(c, 5083, 2743, -1) {

			@Override
			public void handleObject() {
				c.getPA().movePlayer(2713, 9564, 0);
			}
		});
		/*
		 * Object: 5103
		 */
		addDungeonObject(new DungeonObject(c, 5103, 2690, -1) {

			@Override
			public void handleObject() {
				if (c.getX() == 2691)
					c.getPA().walkTo(-2, 0);
				else if (c.getX() == 2689)
					c.getPA().walkTo(2, 0);
			}
		});
		/*
		 * Object: 5104
		 */
		addDungeonObject(new DungeonObject(c, 5104, 2683, -1) {

			@Override
			public void handleObject() {
				if (c.getY() == 9568)
					c.getPA().walkTo(0, 2);
				else if (c.getY() == 9570)
					c.getPA().walkTo(0, -2);
			}
		});
		/*
		 * Object: 5111
		 */
		addDungeonObject(new DungeonObject(c, 5111, 2647, -1) {

			@Override
			public void handleObject() {
				c.getPA().movePlayer(2649, 9562, 0);
			}
		});
		/*
		 * Object: 5110
		 */
		addDungeonObject(new DungeonObject(c, 5110, 2649, -1) {

			@Override
			public void handleObject() {
				c.getPA().movePlayer(2647, 9557, 0);
			}
		});
		/*
		 * Object: 5088
		 */
		addDungeonObject(new DungeonObject(c, 5088, 2683, -1) {

			@Override
			public void handleObject() {
				if (c.getX() == 2682)
					c.getPA().walkTo(6, 0);
			}
		});
		/*
		 * Object: 5090
		 */
		addDungeonObject(new DungeonObject(c, 5090, 2686, -1) {

			@Override
			public void handleObject() {
				if (c.getX() == 2687)
					c.getPA().walkTo(-6, 0);
			}
		});
	}

}
